﻿using PropertyChanged;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.Tracing;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using VIA.Integration;
using VIA.SiMoJi.Domain.Electronics;
using VIA.SiMoJi.Presentation.ViewModel;

namespace VIA.SiMoJi.Presentation.View
{
    /// <summary>
    /// CylinderDebugView.xaml 的交互逻辑
    /// </summary>
    public partial class CylinderDebugView : UserControl
    {
        public CylinderDebugViewModel Cylinder
        {
            get { return (CylinderDebugViewModel)GetValue(MyCylinderProperty); }
            set
            {
                SetValue(MyCylinderProperty, value);
            }
        }

        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty MyCylinderProperty =
            DependencyProperty.Register(nameof(Cylinder), typeof(CylinderDebugViewModel), typeof(CylinderDebugView), new PropertyMetadata(new CylinderDebugViewModel())/*, new ValidateValueCallback(InitMotionPaths)*/);
        public CylinderDebugView()
        {
            InitializeComponent();
        }

        private void Bt_Pushout_Click(object sender, RoutedEventArgs e)
        {
            Cylinder?.PushuOut();

        }

        private void Bt_TakeBack_Click(object sender, RoutedEventArgs e)
        {
            Cylinder?.TakeBack();
        }
    }
}
